import { request } from '@/utils'

export default {
  // 获取求职者简历
  getResume: (seeker_id) => request.get(`/seeker/getResume/${seeker_id}`),
  // 获取求职者个人信息
  getSeeker: (seeker_id) => request.get(`/seeker/getSeeker/${seeker_id}`),
  // 获取求职者教育经历
  getEducationExperience: (seeker_id) => request.get(`/seeker/getEducationExperience/${seeker_id}`),
  // 获取求职者项目经历
  getProjectExperience: (seeker_id) => request.get(`/seeker/getProjectExperience/${seeker_id}`),
  // 获取求职者工作经历
  getWorkExperience: (seeker_id) => request.get(`/seeker/getWorkExperience/${seeker_id}`),
  // 获取求职者求职意向
  getJobIntention: (seeker_id) => request.get(`/seeker/getJobIntention/${seeker_id}`),
  // 更新个人信息
  updateSeeker: (data) => request.put('/seeker/updateSeeker', data),
  // 保存教育经历
  saveEducationExperience: (data) => request.post('/seeker/saveEducationExperience', data),
  // 保存项目经历
  saveProjectExperience: (data) => request.post('/seeker/saveProjectExperience', data),
  // 保存工作经历
  saveWorkExperience: (data) => request.post('/seeker/saveWorkExperience', data),
  // 保存求职意向
  saveJobIntention: (data) => request.post('/seeker/saveJobIntention', data),
  // 获取求职者推荐岗位
  getRecommendJobs: (seeker_id,amount) => request.get(`/seeker/getRecommendJobs/${seeker_id}?amount=${amount}`),
  // 获取求职者推荐岗位（未登录时推荐内容）
  getCommonRecommendJobs: (amount) => request.get(`/seeker/getCommonRecommendJobs?amount=${amount}`),
  // 获取求职者推荐岗位
  getRecommendCompanies: (seeker_id,amount) => request.get(`/seeker/getRecommendCompanies/${seeker_id}?amount=${amount}`),
  // 获取求职者推荐岗位（未登录时推荐内容）
  getCommonRecommendCompanies: (amount) => request.get(`/seeker/getCommonRecommendCompanies?amount=${amount}`),
  // 获取职位详情
  getJobDetail: (job_id) => request.get(`/seeker/getJobDetail/${job_id}`),
  // 获取企业详情
  getCompanyDetail: (company_id, job_count) => request.get(`/seeker/getCompanyDetail/${company_id}?job_count=${job_count}`),
  // 收藏职位
  collectJob: (seeker_id, job_id) => request.post(`/seeker/collectJob?seeker_id=${seeker_id}&job_id=${job_id}`),
  // 获取收藏职位列表
  getCollection: (seeker_id) => request.get(`/seeker/getCollection/${seeker_id}`),
  // 取消收藏
  cancelCollection: (seeker_id, job_id) => request.put(`/seeker/cancelCollection?seeker_id=${seeker_id}&job_id=${job_id}`),
  // 判断是否已收藏该职位
  hasCollectedJob: (seeker_id, job_id) => request.get(`/seeker/hasCollectedJob?seeker_id=${seeker_id}&job_id=${job_id}`),
  // 关注企业
  followCompany: (seeker_id, company_id) => request.post(`/seeker/followCompany?seeker_id=${seeker_id}&company_id=${company_id}`),
  // 获取关注企业列表
  getFollowing: (seeker_id) => request.get(`/seeker/getFollowing/${seeker_id}`),
  // 取消关注企业
  cancelFollowing: (seeker_id, company_id) => request.put(`/seeker/cancelFollowing?seeker_id=${seeker_id}&company_id=${company_id}`),
  // 判断是否已关注该企业
  hasFollowedCompany: (seeker_id, company_id) => request.get(`/seeker/hasFollowedCompany?seeker_id=${seeker_id}&company_id=${company_id}`),
  // 搜索职位
  searchJobs: (key) => request.get(`/seeker/searchJobs?key=${key}`),
  // 搜索企业
  searchCompanies: (key) => request.get(`/seeker/searchCompanies?key=${key}`),
  // 搜索职位
  searchCodeJobs: (job_code) => request.get(`/seeker/searchCodeJobs?job_code=${job_code}`),
  // 投递简历
  submitResume: (data) => request.post('/seeker/submitResume',data),
  // 获取投递简历列表
  getResumeSubmissions: (seeker_id) => request.get(`/seeker/getResumeSubmissions/${seeker_id}`),
}
